package com.atguigu.spzx.manager;

import com.atguigu.spzx.common.handler.SpzxGlobalExceptionHandler;
import com.atguigu.spzx.log.anno.EnableSpzxLog;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

//启动类默认只能扫描自己所在包和子包内的组件类: @Component @Repository @Service @Controller @ControllerAdvice @Bean
@EnableScheduling//启用定时任务
@SpringBootApplication
@EnableTransactionManagement //启用事务管理
@MapperScan(basePackages ={"com.atguigu.spzx.*.mapper" } )
@EnableSpzxLog
//@ComponentScan(basePackages = {"com.atguigu.spzx"})
//@Import({SpzxGlobalExceptionHandler.class})
public class SpzxManagerApplication {
    public static void main(String[] args) {
        SpringApplication.run(SpzxManagerApplication.class,args);
    }
}
